<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Title</title>
    <style>
        [v-cloak]{
            display: none;
        }
    </style>
</head>
<body>
<div id="app" v-cloak>
    <ul>
        <li v-for="item in names">{{item}}</li>
    </ul>
    <button v-on:click="changeArray">修改数组</button>
</div>
<script src="https://unpkg.com/vue@3"></script>
<script>
    const app=Vue.createApp({
        data(){
            return{
                names:['abc','acb','nba','aaa','ccc']
            }
        },
        methods:{
            changeArray(){
                // this.names.push("hahah")
                // this.names.pop()
                // this.names.shift()
                // this.names.unshift("haha")
                // this.names.splice(2,1,'nihao')
                // this.names.sort()
                // this.names.reverse()
                // this.names=this.names.concat([12,54,'jjj'])
                this.names=this.names.slice(1)
            }
        }
    })
    app.mount("#app")
</script>
</body>
</html>